package cn.jixie.utils;

import org.apache.log4j.Logger;

import java.util.Properties;

/**
 * @Auther: lzl
 * @Date: 18-10-25 11:20
 * @Description: 读取配置文件的工具类
 */
public class PropertiesUtils {
    private static Properties properties=new Properties();
    private static Logger logger = Logger.getLogger(PropertiesUtils.class);
    static {
        try {
            //配置文件所在的路径
            properties.load(PropertiesUtils.class.getClassLoader().getResourceAsStream("./config/wechat.properties"));
        } catch (Exception e) {
            logger.info(e.getMessage());
        }
    }

    public static String getProperty(String key) {
        return properties.getProperty(key);
    }
}
